<?php
require '../model/Db.php';
$Db = Db::getInstance();
$user_data = $Db->islogin();
if($user_data){
	session_unset();
	session_destroy();
	if(setcookie(session_name(),'',time()-3600,'/')){
		$success = true;
	}
}else{
	$success = false;
}
echo(json_encode([success => $success]));